<!DOCTYPE html>
<html>
<head>
    <title>设备管理系统</title>
    <meta charset="UTF-8">
    <style>
        body { font-family: Arial, sans-serif; margin: 40px; }
        .container { max-width: 800px; margin: 0 auto; }
        .api-list { background: #f5f5f5; padding: 20px; border-radius: 5px; }
        .endpoint { margin: 10px 0; padding: 10px; background: white; border-left: 4px solid #007bff; }
    </style>
</head>
<body>
<div class="container">
    <h1>🚀 设备管理系统 API</h1>
    <p>Spring Boot应用已成功启动！</p>

    <div class="api-list">
        <h2>可用接口：</h2>

        <div class="endpoint">
            <strong>认证接口</strong><br>
            POST /api/auth/register - 用户注册<br>
            POST /api/auth/login - 用户登录
        </div>

        <div class="endpoint">
            <strong>设备管理接口</strong> (需要JWT认证)<br>
            GET /api/devices - 获取所有设备<br>
            POST /api/devices - 创建设备<br>
            GET /api/devices/{id} - 获取设备详情<br>
            PUT /api/devices/{id} - 更新设备<br>
            DELETE /api/devices/{id} - 删除设备
        </div>

        <div class="endpoint">
            <strong>开发工具</strong><br>
            <a href="/h2-console" target="_blank">H2数据库控制台</a> - 查看数据库内容
        </div>
    </div>

    <h3>快速测试：</h3>
    <p>使用Postman或curl测试API接口：</p>
    <pre>
# 用户注册
curl -X POST http://localhost:8080/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"username":"test","password":"123456","email":"test@example.com"}'

# 用户登录
curl -X POST http://localhost:8080/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"test","password":"123456"}'
        </pre>
</div>
</body>
</html>